package Cn.Sarkar.MMS.Entities.Additional

import Cn.Sarkar.EntityDream.CoreEngine.RDBMS.Core.Extensions.hasOne
import Cn.Sarkar.EntityDream.CoreEngine.RDBMS.IDataContext
import Cn.Sarkar.Entities.MMS.Additional.IThirdPartyAccount
import Cn.Sarkar.MMS.DataBaseDefinations.Additional.ThirdPartyAccounts
import Cn.Sarkar.Entities.Common.BaseEntity
import Cn.Sarkar.MMS.Entities.Independent.Account
import Cn.Sarkar.Entities.MMS.Independent.IAccount

class ThirdPartyAccount(DataContext: IDataContext) : BaseEntity(DataContext, ThirdPartyAccounts), IThirdPartyAccount {
    var accountID by ThirdPartyAccounts.AccountID
    override var account: IAccount by hasOne(ThirdPartyAccounts.AccountID) { Account(it) }
    override var weChatOpenID: String by ThirdPartyAccounts.WeChatOpenID
    override var aliPayOpenID: String by ThirdPartyAccounts.AliPayOpenID
    override var qqOpenID: String by ThirdPartyAccounts.QQOpenID
}